public class Math1 {
	public static void main(String[] args) {
		System.out.println(Math.round(-1.5));	// -1
		System.out.println(Math.round(-2.5));	// -2 
		System.out.println(Math.round(1.5));	// 2
		System.out.println(Math.round(2.5));	// 3
		System.out.println(-1.5 + 0.5);			// -1.0
		System.out.println(1.5 + 0.5);			// 2.0

		xx();

		System.out.println("----");
		print(-1.5);
		print(-1.5+0.5);
		print(-1.0);
		System.out.println("----");

		print(1.5);
		print(1.5+0.5);
		print(2.0);

		System.out.println("----");
		String s1 = "abc";
		String s2 = "abc";
		System.out.println(s1 == s2);
	}

	static void print(double d) {
    	System.out.printf("%016x\n", Double.doubleToLongBits(d));
	}

	public static void xx() {
	    double a = 0.5;
	    double b = 0.49999999999999994;

	    print(a);      // 3fe0000000000000
	    print(b);      // 3fdfffffffffffff
	    print(a+b);    // 3ff0000000000000
	    print(1.0);    // 3ff0000000000000
	}
}